import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:videotop/mycolor.dart';
import 'package:videotop/myinfo.dart';
import 'package:videotop/util.dart';
import 'package:videotop/widget/splash.dart';
import 'package:provider/provider.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  if (Platform.isAndroid) {
    SystemUiOverlayStyle systemUiOverlayStyle = SystemUiOverlayStyle(
        statusBarColor: Colors.transparent,
        statusBarIconBrightness: Brightness.light);
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
  runApp(
    MultiProvider(
    providers: [
      ChangeNotifierProvider(create: (_)=>Util()),
      ChangeNotifierProvider(create: (_)=>MyInfo()),
    ],
    child: MyApp(),
  ),);
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
          primaryColor: Colors.grey[100],
          scaffoldBackgroundColor: Colors.grey[100],
          backgroundColor: Colors.grey[100]),
      home: Splash(),
    );
  }
}
